<template>

    <a-popover :title="fileName" >
        <div slot="content" style="text-align:center">
            <a @click="handleDown()">
                <a-icon type="cloud-download"/>
                下载
                <AkFileDown :url="url" ref="AkFileDown"/>
            </a>
        </div>
        <a-icon type="file-word" :style="`fontSize:${imgHeight}px`"/>
    </a-popover>

</template>
<script>
import AkFileDown from './AkFileDown';
import {getAction} from '../../../api/manage';
import {fileManager} from '../../../api/url';
export default {
    name:"AkWordPreview",
    describe:"Word预览",
    components:{AkFileDown},
    props:{
        url:{
            type:String,
            required:true
        },
        fileName:{
            type:String,
            required:false,
            default:''
        },
        imgHeight:{
            type:Number,
            required:false,
            default:50
        }
    },
    data(){
        return {
            exported:false,
            visible:false,
            text:'',
        }
    },
    methods:{
        handleDown(){
            this.$refs.AkFileDown.down();
        },
    }

}
</script>
<style scoped>
pre{
  white-space:pre-wrap;
  white-space:-moz-pre-wrap;
  white-space:-pre-wrap;
  white-space:-o-pre-wrap;
  word-wrap:break-word;
}
</style>